﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using EShop.Core;
using EShop.Core.Model.Store;

namespace EShop.Services.Store
{
    public interface ICategory
    {
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="?"></param>
        /// <returns></returns>
        int AddCategory(Category model);
        /// <summary>
        /// 修改一条信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool UpdateCategory(Category model);
        /// <summary>
        /// 分页列表一个信息
        /// </summary>
        /// <param name="start"></param>
        /// <param name="limit"></param>
        /// <param name="fiter"></param>
        /// <returns></returns>
        List<Category> GetAllCategory(bool showHidden = false);
        IPagedList<Category> GetCategory(int pageIndex, int pageSize, bool showHidden = false);
        List<Category> GetCategoryByParentId(int ParentId, bool? IsSystem, bool showHidden = false);

        /// <summary>
        /// 取得一条信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Category GetCategoryById(int id);
        /// <summary>
        /// 删除一条信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DeleteById(string id);
        /// <summary>
        /// 获得商品分类
        /// </summary>
        /// <param name="Pid"></param>
        /// <returns></returns>
        List<Category> GetInfoForProduct();
        /// <summary>
        /// 取得当前节点深度
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int GetDepth(int id);
    }
}
